package top.ijiujiu.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * SuperEntity
 *
 * @Author 神秘的黄瓜
 * @Version 1.0
 * @Date 2020-04-01 11:30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "父对象", description = "父对象")
public abstract class SuperEntity implements Serializable {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "ID", type = IdType.ASSIGN_UUID)
    protected String id;

    @ApiModelProperty(value = "版本号")
    @TableField(value = "VERSION")
    @Version
    protected Integer version;

    @ApiModelProperty(value = "是否删除(Y=已删除, N=未删除)")
    @TableField(value = "DELETE_FLAG", fill = FieldFill.INSERT)
    @TableLogic
    protected String deleteFlag = "N";

}
